<?php
/**
 * Created by PhpStorm.
 * User: HS032
 * Date: 2020/10/10
 * Time: 15:59
 */

namespace pay\modules\backend\controllers;

use pay\libs\Tools;
use pay\modules\backend\models\RewardConfig;
use Yii;

class RewardConfigController extends BasicController
{

    /*** 红包配置信息
     * @return false|string
     */
    public function actionconfigInfo()
    {
        if (Yii::$app->request->isPost){
            $post = Yii::$app->request->post();
            $appId = isset($post['appId'])?$post['appId']:'';
            $hid = isset($post['hid'])?$post['hid']:'';
            if (empty($appId)){
                return Tools::showRes(10404,'参数有误');
            }
            $app_id = $this->getAppId($appId);

            $rewardConfigModel = new RewardConfig();
            $rewardConfigList = $rewardConfigModel->getConfigInfo($app_id,$hid);

            return Tools::showRes(0,'success',[
                'rewardConfigInfo' => $rewardConfigList,
            ]);

        }

    }

    public function action()
    {

    }
    
    
    
}